'''
This file is part of DopplerShift.

    DopplerShift is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DopplerShift is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DopplerShift.  If not, see <http://www.gnu.org/licenses/>.
'''

from dopplershift.core.exc import DSException

class MappingError(DSException):
    '''
    Error while processing mapping object
    '''

class DSMapObject(object):
    '''
    Simple prototype map object for mapping custom objects
    '''
    def __init__(self, **kwargs):
        for el in kwargs:
            self._setItem(el, kwargs[el])
    def _setItem(self, attr_key, attr_value):
        setattr(self, attr_key, attr_value)
